package com.it.mapper;

import com.it.pojo.Books;
import com.it.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UsersMapper {
    @Select("SELECT COUNT(*) FROM user")
    Long count();

    @Select("SELECT * FROM user LIMIT #{offset}, #{pageSize}")
    List<User> list(Integer offset, Integer pageSize);


    @Delete("delete from user where id = #{id}")
    void deleteusers(Integer id);
}
